/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mirac
 * Date: 2025-04-20
 * Time: 19:53
 */
/*public class Bock1 {
    public static void main(String[] args) {
    int a = 10;
    int b = 20;
    System.out.println("第一次调用方法之前");
    int ret = sum(a,b);
    System.out.println("第一次调用方法之后");
    System.out.println("ret = "+ret);

    System.out.println("第二次调用方法之前");
    ret = sum(30,50);
    System.out.println("第二次调用方法之后");
    System.out.println("ret = "+ret);
    }

    public static int sum(int x,int y) {
        System.out.println("调用方法中x = "+ x +" y = "+y);
        return x+y;
    }
}*/

public class Bock1 {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        System.out.println("交换前：a = "+a+" b = "+b);
        wap(a,b);
        System.out.println("交换后：a = "+a+" b = "+b);

    }
    public static void wap(int a,int b) {
        int x = 0;
        x = a;
        a = b;
        b = x;
    }
}

